<?php

require_once 'RoomDetail.php';
require_once 'config.php';
require_once 'MessageCode.php';
class Room
{
    public $roomList;//房间列表

    public function __construct()
    {
        for ($i = 0; $i < Config::$roomNumber; $i++) {
            $roomDetail = new RoomDetail($i);
            $roomList[$i] = $roomDetail;
        }

    }

    /**
     * chenming 2018-07-13
     * 获取房间列表
     * @return array
     */
    public function getRoomList()
    {
        $keyList = [];
        foreach ($this->roomList as $key => $value) {
            $keyList[] = $key;
        }
        return $keyList;
    }
}